import Link from 'next/link'
import Static from './Static'
import {ReactNode} from 'react'
import {primaryHover} from '../styles/common-color'
//
// type NLinkPropsType = {
//     children?: ReactNode,
//     href?: string,
//     label: string | number,
//     fontSize?: string,
//     color?: string,
//     hover?: string
// }


const NLink = ({href, label, fontSize, color, children, hover}) => (
    <Link prefetch href={href || ''}>
        {children
            ? <a>{children}</a>
            : <Static color={color} fontSize={fontSize} label={label} hover={hover || primaryHover}/>
        }
    </Link>
)

export default NLink